package com.gitee.wsl.doc.prosemirror.model.mark

import com.gitee.wsl.doc.prosemirror.model.attr.Attrs

interface MarkCreator<T : Mark> {
    fun create(type: MarkType, attrs: Attrs): T

    companion object {
        internal val DEFAULT = object : MarkCreator<Mark> {
            override fun create(type: MarkType, attrs: Attrs): Mark {
                return Mark(type, attrs)
            }
        }
    }
}